<?php 
	$ask_con = array();
	//if(option_yes('teamask')) { $ask_con[] = 'team_id > 0'; } 
	//else { $ask_con['team_id'] = $id; }
	$ask_con['team_id'] = $team['id'];
	$ask_count = Table::Count('ask', $ask_con);
	$asks = DB::LimitQuery('ask', array('condition'=>$ask_con, 'size'=>3, 'order'=>'ORDER BY id DESC'));
; ?>
<div class="deal-consult sbox">
	<div class="sbox-bubble"></div>
	<div class="sbox-top"></div>
	<div class="sbox-content">
		<div class="deal-consult-tip">
			<h2>Bình luận về sản phẩm này</h2>
			<p class="nav" style="padding: 10px;"><a href="/comment.html?id=<?php echo $team['id']; ?>">Xem tất cả (<?php echo $ask_count; ?>)</a></p>
			<ul class="list">
			<?php if(is_array($asks)){foreach($asks AS $one) { ?>
				<li style="border-bottom: 0px"><a href="/comment.html?id=<?php echo $team['id']; ?>#ask-entry-<?php echo $one['id']; ?>"><?php echo htmlspecialchars(mb_substr($one['content'],0,30,'UTF-8')); ?>...</a></li>
			<?php }}?>
			</ul>
		<a href="/comment.html?id=<?php echo $team['id']; ?>#post"><img alt="" src="../static/img/comment.png"></a>
		</div>
	</div>
	<div class="sbox-bottom"></div>
</div>
